#Latin Empire surely should be a historical rival, no?
historical_rival = LAE

#Land rebalance
change_estate_land_share = {
	estate = estate_burghers
	share = 1
}

change_estate_land_share = {
	estate = estate_church
	share = -1
}
change_estate_land_share = {
	estate = estate_nobles
	share = 5
}

#To allow for the conversion to Catholic if draining Patriarch Authority.
patriarch_authority = 0.15
#BR initiator because Paradox coded on_actions weirdly. This flag is literally only here to tell on_startup that this mod is in fact loaded, without causing conflicts with my other mods that depend on on_actions.
set_global_flag = byz_resurgence_loaded

#Starting privileges
set_estate_privilege = estate_nobles_latifundia_kantakouzenos
set_estate_privilege = estate_nobles_latifundia_philantropenos
set_estate_privilege = estate_nobles_latifundia_metochites
set_estate_privilege = estate_nobles_latifundia_choumnos
set_estate_privilege = estate_nobles_latifundia_melissenos
set_estate_privilege = estate_nobles_latifundia_tornikes

#Gov mechanics debug
# add_government_reform = reformed_byzantine_monarchy_reform
# set_country_flag = byz_restored_bureaucracy_mechanic
# set_country_flag = byz_restored_pronoia_mechanic
# set_country_flag = byz_restored_militarization_mechanic

#Starting modifiers
add_country_modifier = {
	name = "byz_bad_navy"
	duration = -1
}

add_country_modifier = {
	name = "byz_bad_economy"
	duration = -1
}

add_country_modifier = {
	name = "byz_bad_military"
	duration = -1
}

add_country_modifier = {
	name = "byz_bad_religion"
	duration = -1
}

add_country_modifier = {
	name = "byz_bad_trade"
	duration = -1
}

#The grand KoK purge
remove_estate_privilege = estate_nobles_deteriorating_army
remove_estate_privilege = estate_church_union_of_the_churches
remove_estate_privilege = estate_burghers_reliance_on_republics
remove_estate_privilege = estate_burghers_exkousseiai_for_latins
remove_country_modifier = BYZ_alienation_of_western_merchants #Because the way I remove it necessitates the removal of the country modifier as well.
		
1391.2.16 = {
	monarch = {
		name = "Manuel II"
		dynasty = "Palaiologos"
		birth_date = 1350.6.27		
		adm = 1
		dip = 5 #Grand tour of Manuel II, visiting all of Europe to ask for allies against the Ottomans.
		mil = 2 #Hexamilion wall
	}
}

1392.12.18 = {
	heir = {
		name = "Ioannes"
		monarch_name = "Ioannes VIII"
		dynasty = "Palaiologos"
		birth_date = 1392.12.18
		death_date = 1448.10.31
		claim = 95
		adm = 2
		dip = 4 #Buffed this, John VIII was quite diplomatic.
		mil = 2
	}
}

1425.7.21 = {
	monarch = {
		name = "Ioannes VIII"
		dynasty = "Palaiologos"
		birth_date = 1392.12.18
		adm = 2
		dip = 4 #Buffed this, John VIII was quite diplomatic.
		mil = 2
	}
	#To add ruler trait to Ioannes VIII
	add_ruler_personality = tolerant_personality
}

1425.7.21 = {
	heir = {
		name = "Konstantinos"
		monarch_name = "Konstantinos XI"
		dynasty = "Palaiologos"
		birth_date = 1405.2.8
		death_date = 1453.5.29
		claim = 95
		adm = 3
		dip = 4
		mil = 4 
	}
	#To add ruler trait to Konstantinos XI
	add_heir_personality = well_connected_personality
}

1437.1.1 = { #Grand Domestic Andronikos Palaiologos Kantakouzenos
	leader = {	name = "Andronikos Palaiologos Kantakouzenos"	type = general	fire = 2	shock = 2	manuever = 2	siege = 0	death_date = 1453.5.29 }
}

1439.4.9 = { #Council of Florence ratified.
	set_ruler_religion = catholic
	set_heir_religion = catholic
	set_country_flag = rebellious_demetrios_flag #To allow for Demetrios to rise (integrated_byz_events.16)
	
	change_estate_land_share = {
		estate = estate_church
		share = -10
	}
	change_estate_land_share = {
		estate = estate_nobles
		share = 10
	}
	
	
}

1440.7.21 = {
	#To add 2nd ruler trait to Ioannes VIII
	add_ruler_personality = silver_tongue_personality
}

1448.10.31 = {
	monarch = {
		name = "Konstantinos XI"
		dynasty = "Palaiologos"
		birth_date = 1405.2.8
		adm = 3 
		dip = 4
		mil = 4 
		leader = {	name = "Konstantinos XI"	type = general	fire = 3	shock = 3	manuever = 4	siege = 0 }
	}
	#To add 2nd ruler trait to Konstantinos XI
	add_ruler_personality = inspiring_leader_personality
}

1452.1.1 = { leader = {	name = "Giovanni Giustiniani"	type = general	fire = 2	shock = 2	manuever = 3	siege = 0	death_date = 1453.5.29 } }